home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000004_icon-group-sender _Fri Jan 3 11:52:09 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
1KB
Received: by cheltenham.cs.arizona.edu; Fri, 3 Jan 1997 17:23:42 MST
Date: Fri, 3 Jan 1997 11:52:09 -0600
Message-Id: <199701031752.LAA32416@ns1.computek.net>
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
From: gep2@computek.net
Subject: Help for an Icon Neophyte
To: icon-group@cs.arizona.edu
X-Mailer: SPRY Mail Version: 04.00.06.17
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 761
>procedure countwords()
wordcount := table(0)
while line := read() do
line ? {
while tab(upto(&letters)) do
wordcount[tab(many(&letters))] +:= 1
}
return wordcount
end
>I have run into the following problems. First, I was unsuccessful at
mapping lowercase letters on to uppercase letters. I assume that I want
to use something like map(line, &ucase, &lcase), but where should I
insert it? And should the csets &ucase and &lcase be bracketted by
single quotations marks?
You can simply change the appropriate line from the countwords routine as
follows:
while line := map(read(),&ucase,&lcase) do
I expect that you'll receive lots of other replies for the other issues you
mentioned.
Gordon Peterson
http://www.computek.net/public/gep2/